his public key; he encrypts a message using this key and then sends it

to B. The B then decrypts the message using the secret part of his own

key.

The advantages of this scheme include: only one part must be kept

secret, no need to change your public/ private key pair unless, of

course, someone finds your public key, there need to be N

public/ private key pairs for N people to communicate, no need for

initial key exchange, it can serve as a digital signature.

One message is to be posted by A on a Web forum, and he wants

everyone reading the forum to be able to authenticate that the message

was actually posted by him. A uses his private key to encrypt the

message. If the encrypted message on the forum was posted by A, then

it must be decryptable using his public key. As everyone has access to

his public key, this can be verified.

The disadvantages of this scheme are: slow to do the enormous

amount of computation involved; keys must be long (at least 1,024

bits), there is no proof of a public key scheme to be secure, it has not

been around long enough to be tested as much.

Public key cryptography: Diffie– Hellman

Y = Public K ey

X = Secret K ey

The user i derives Y as follows

Yi = a^ (xi) mod g

The user j derives Y in the same way.

Yj = a^ (xj ) mod g

The users i and j exchange their Y’s and perform the computation

Z ij = Yj ^ (xi) = (a^ (xj ))^ (xi) mod g = (a^ (xi))^ (xj ) mod g = Z j i

This value of Z is used as the input to a random number generator.

These random bits are used to XOR the original message.

3 . The Diffie– Hellman key distribution scheme is a public-key

cryptography scheme that uses a one-way function and has security

due to the difficulty of calculating logarithms as compared to the ease

of calculating exponentiations.